

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
	无忧考吧
</title><link href="css/mian.css" tppabs="http://wxdk.wyk8.com/Exam/css/mian.css" rel="stylesheet" /><meta name="viewport" content="width=device-width,initial-scale=1" /><link rel="stylesheet" href="../../g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" tppabs="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" /><link rel="stylesheet" href="../../g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css" tppabs="http://g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css" /><link href="css/mian.css" tppabs="http://wxdk.wyk8.com/Exam/css/mian.css" rel="stylesheet" /></head>
<body style="background: url(images/wecom_bg.jpg); background-size: cover;">
    <div class="long_bnt">
        <div class="width-b">
            <button style="background: #3ea500;" onclick="javascript:location.href='SubjectSelection.aspx-istry=1.htm'/*tpa=http://wxdk.wyk8.com/Exam/SubjectSelection.aspx?istry=1*/">试用</button>
        </div>
        <div class="width-b">
            <button style="background: #ff6e01;" onclick="login()" id="login">登录</button>
        </div>
        <div class="cl"></div>
    </div>
    <script type='text/javascript' src="../../g.alicdn.com/sj/lib/zepto/zepto.min.js" tppabs="http://g.alicdn.com/sj/lib/zepto/zepto.min.js" charset='utf-8'></script>
    <script>
        function login() {
            
            $("#login").unbind();
            $.ajax({
                url: "Action/Ajax.ashx?ref=" + new Date().getTime(),
                type: "post",
                data: {
                    action: "getUserActivationState"
                },
                async: true,
                cache: false,
                success: function (result) {
                    if (result == "-1") {
                        location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx207e285d30b608a2&redirect_uri=http%3a%2f%2fwxdk.wyk8.com%2fExam%2fwxAction.aspx&response_type=code&scope=snsapi_userinfo&state=JIANLI";
                    }
                    else {
                        //location.href = "SubjectSelection.aspx-istry=0.htm"/*tpa=http://wxdk.wyk8.com/Exam/SubjectSelection.aspx?istry=0*/;
                        tosubject();
                    }

                }
            });
        }
        function tosubject() {
            $.ajax({
                url: "Action/Ajax.ashx?ref=" + new Date().getTime(),
                type: "post",
                data: {
                    action: "tosubject"
                },
                async: true,
                cache: false,
                success: function (result) {
                    result = $.parseJSON(result);
                     if (result.length == 0 || result[0].SubjectID == null) {
                        location.href = 'FirstActive.aspx.htm'/*tpa=http://wxdk.wyk8.com/Exam/FirstActive.aspx*///"SubjectSelection.aspx-istry=0.htm"/*tpa=http://wxdk.wyk8.com/Exam/SubjectSelection.aspx?istry=0*/;
                        return;
                     }
                     else if (result[0].lastaccesssubject != null && result[0].lastaccesssubject != "" && result[0].lastaccesssubject != undefined) {
                         location.href = 'http://wxdk.wyk8.com/Exam/Exam.aspx?istry=' + (result[0].iKeyInfoID == null ? "1" : "0") + '&subjectid=' + result[0].lastaccesssubject;
                     }
                    else {
                        location.href = 'http://wxdk.wyk8.com/Exam/Exam.aspx?istry=0&subjectid=' + result[0].SubjectInfoID;
                    }
                }
            });
        }
    </script>
</body>
</html>
